package com.fantabest.common.entity;

import java.io.Serializable;

import javax.jdo.annotations.Extension;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.NullValue;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Player implements Serializable {

	private static final long serialVersionUID = -1519585693255866019L;
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	@Extension(vendorName="datanucleus", key="gae.encoded-pk", value="true")
	private String encodedKey;
	
	@Persistent
    @Extension(vendorName="datanucleus", key="gae.pk-id", value="true")
	private Long id;

	@Persistent(nullValue = NullValue.EXCEPTION)
	private String lastname;
	@Persistent(nullValue = NullValue.EXCEPTION)
	private String position;
	@Persistent(nullValue = NullValue.EXCEPTION)
	private int quotation;
	@Persistent(nullValue = NullValue.EXCEPTION)
	private int cost;
	@Persistent(nullValue = NullValue.EXCEPTION)
	private String club;
	
	private byte[] image;

	public Player() {
	}

	public Player(Long id, String lastname, String position, int quotation,
			int cost, String club, byte[] image) {
		super();
		this.id = id;
		this.lastname = lastname;
		this.position = position;
		this.quotation = quotation;
		this.cost = cost;
		this.club = club;
		this.image = image;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getLastname() {
		return lastname;
	}

	public void setLastname(String lastname) {
		this.lastname = lastname;
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	public int getCost() {
		return cost;
	}

	public void setCost(int cost) {
		this.cost = cost;
	}

	public String getClub() {
		return club;
	}

	public void setClub(String club) {
		this.club = club;
	}

	public byte[] getImage() {
		return image;
	}

	public void setImage(byte[] image) {
		this.image = image;
	}

	public int getQuotation() {
		return quotation;
	}

	public void setQuotation(int quotation) {
		this.quotation = quotation;
	}

	public String getEncodedKey() {
		return encodedKey;
	}

	public void setEncodedKey(String encodedKey) {
		this.encodedKey = encodedKey;
	}
}
